<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="com.josiejune.documentdispatch.handlers.OperatorHandler" %>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Select Date to View History</title>

<%@ include file="links.jsp" %>


 
<script language="javascript">

function updateFields() {
	var yearBox = document.getElementById('year');
	var monthBox = document.getElementById('month');
	var dayBox = document.getElementById('day');
	var chk = document.getElementById('searchAllDates');

	if (chk.checked == true) {
		yearBox.disabled = true;
		monthBox.disabled = true;
		dayBox.disabled = true;
	} else if (chk.checked == false) {
		yearBox.disabled = false;
		monthBox.disabled = false;
		dayBox.disabled = false;
	}
}
 
</script>

</head>
<body id="index">

<div id="page" class="xgrid xfluid">

<div id="header" class="x12">
<div class="xpad">
<h1>Select Filtering Options</h1>
</div>
</div>
<%@ include file="headermenu.jsp" %>

<br/>
<div class="x5" />
<form name="selectDate" action="/msglists/Archive.jsp" method="post">


	<input type="checkbox" id="searchAllDates" name="searchAllDates" onclick="updateFields()"/>Search All Dates<br/>

	<h4><label for="year">Year</label></h4>
	<input id="year" name="year" size="10" value=2010 type="text" /><br/>
	
	<h4><label for="month">Month</label></h4>
	<select id="month" name=month value=''>Select Month</option>
		<option value='00'>January</option>
		<option value='01'>February</option>
		<option value='02'>March</option>
		<option value='03'>April</option>
		<option value='04'>May</option>
		<option value='05'>June</option>
		<option value='06'>July</option>
		<option value='07'>August</option>
		<option value='08'>September</option>
		<option value='09'>October</option>
		<option value='10'>November</option>
		<option value='11'>December</option>
	</select>
	
	<h4><label for="day">Day</label></h4>
	<select id="day" name=day >
		<option value='01'>01</option>
		<option value='02'>02</option>
		<option value='03'>03</option>
		<option value='04'>04</option>
		<option value='05'>05</option>
		<option value='06'>06</option>
		<option value='07'>07</option>
		<option value='08'>08</option>
		<option value='09'>09</option>
		<option value='10'>10</option>
		<option value='11'>11</option>
		<option value='12'>12</option>
		<option value='13'>13</option>
		<option value='14'>14</option>
		<option value='15'>15</option>
		<option value='16'>16</option>
		<option value='17'>17</option>
		<option value='18'>18</option>
		<option value='19'>19</option>
		<option value='20'>20</option>
		<option value='21'>21</option>
		<option value='22'>22</option>
		<option value='23'>23</option>
		<option value='24'>24</option>
		<option value='25'>25</option>
		<option value='26'>26</option>
		<option value='27'>27</option>
		<option value='28'>28</option>
		<option value='29'>29</option>
		<option value='30'>30</option>
		<option value='31'>31</option>
	</select>
	
	<h4><label for="salesOrderId">Macola Order Number</label></h4>
	<input id="salesOrderId" name="salesOrderId" size="10" type="text" /><br/>
	
	
	<h4><label for="completedBy">Completed By:</label> </h4>
	<select name="completedBy" size="1">
	<option value=allOperators>All Operators</option>
		<% 
			Map<Long, String> map = OperatorHandler.getAllOpIDsAndNames();
			Iterator<Long> keys = map.keySet().iterator();
			while (keys.hasNext()) {
				Long key = keys.next();
				%>
			 	<option value=<%= map.get(key) %>><%= map.get(key) %></option>
		<% } %>

	</select>

	<br/>
	<input class="light grey medium" type="submit" value="Search"/>
</form>
</div>
</body>
</html>